/*
 * QEventRetriever.h
 *
 *  Created on: May 24, 2010
 *      Author: deroy2
 */

#ifndef QCALEVENTRETRIEVER_H_
#define QCALEVENTRETRIEVER_H_

#include <QtGui/QMainWindow>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QtNetwork/QAuthenticator>
#include <QMessageBox>
#include <QFile>


class QMessageBox ;

class QCalEventRetriever : public QObject 
{
	Q_OBJECT
public:
	QCalEventRetriever(QWidget *parent = 0);
    ~QCalEventRetriever();
    void load(const QString& url);
    void loadParsed();
    
public slots:
 //   void loginSuccess(const QString& url);
    void close();
    void downloadingCompleted(QNetworkReply*);
    void error(QNetworkReply::NetworkError aErr);
  //  void authenticationReqd(QNetworkReply*,QAuthenticator*);
Q_SIGNALS:
   void downloadCompleted();   
private:
   
    QNetworkAccessManager* manager;
    QMessageBox msgBox;
    QFile* file;
    QString authn;
    QString link;
    static int tag;
};

#endif /* UPLOADER_H_ */
